<?php

namespace app\controller;

use app\BaseController;
use think\facade\Db;

class Pics extends BaseController
{
    public function index()
    {
        echo 'pics';
    }

    // http://www.penyou.com/pics/lists

    public function lists()
    {
        $lists = Db::name('pics')->select();
        // echo json_encode(ara)
        // echo json_encode($lists);
        $arr = array(
            'id' => 1,
            'data' => $lists
        );
        echo json_encode($arr);
    }
}
